<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection-->
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<style th:fragment="style">
    th {
        background-color: red;
    }
</style>
<body th:fragment="body">
<h2 th:text="${name}">列表名称</h2>
<table>
    <thead>
    <tr>
        <th>标题1</th>
        <th>标题2</th>
        <th>标题3</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item: ${array}">
        <th th:text="${item}"></th>
        <td th:text="${item}"></td>
        <td th:text="${item}"></td>
    </tr>
    </tbody>
</table>
</body>
</html>